<%@ page contentType="text/html; charset=UTF-8" language="java" %>
<%@ include file="/parameter.jsp" %>
<%@page isELIgnored="false"%>
<!DOCTYPE>
<html>
<head>
<TITLE>论坛</TITLE>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=8" />
<Meta http-equiv="Pragma" Content="No-cach">
<link href="style/style.css" rel="stylesheet" type="text/css" />
</HEAD>
<body>
<jsp:include page="inc/header.jsp"/>
		<header class="entry-header">
			<h1 class="entry-title">
				<span>论坛首页<div id="searchbar">
				<form name="form3" method="post" action="commonAction.do?method=SearchTopic">
					<input type="text" id="keywords" name="keywords" title="搜索"><button onClick="search();">搜索</button>
				</form>
				</div></span>
			</h1>
		</header>
		
		<div id="maindiv">
			<div id="nav">
			<c:choose>
				<c:when test="${sessionScope.user == null}">
					<div>
						<form name="form1" method="post" action="commonAction.do?method=UserLogin">
						账号：<input type="text" name="username"> 密码：<input type="password" name="password"> 
						<button onClick="loginsubmit();">登陆</button> <a href="commonAction.do?method=toRegister">注册新账号</a>
						</form>
					</div>
				</c:when>
				<c:otherwise>
					<div>
					&nbsp;&nbsp;${sessionScope.user.nickname}&nbsp;你好！<a
							href="commonAction.do?method=Logout">注销</a>&nbsp;|&nbsp;<a
							href="commonAction.do?method=EditUserInfo&uid=${sessionScope.user.id}">修改个人信息</a>&nbsp;|&nbsp;<a
							href="commonAction.do?method=EditUserPwd&uid=${sessionScope.user.id}">修改密码</a>
					</div>
				</c:otherwise>
			</c:choose>
				<a href="./" title="首页">首页</a>
				<span>&gt;</span>
				<a href="###">板块</a>
			</div>
			
			<div id="board">
				<div class="bm">
					<div id="post_r">
						<div class="bm_h"><h2>发布新帖</h2></div>
						<div class="replay_b">
							<form name="form1" method="post" action="commonAction.do?method=EditSubmit&type=${type}&postid=${EditInfo.id}" enctype="multipart/form-data">
								<div class="msg">
									<span class="message cl">&#8226;&nbsp;${info}</span>
								</div>

								<div class="frm_row">
									<a href="commonAction.do?method=index">回到首页</a> | <c:choose><c:when test="${Rstate == 1}">
			<a href="commonAction.do?method=UserRegister">注册</a>
            </c:when><c:when test="${Rstate == 0}">
			<a href="commonAction.do?method=Login">登陆</a>
			</c:when><c:otherwise>
            </c:otherwise></c:choose>
								</div>

							</form>
						</div>
					</div>
				</div>
			</div>
	
		</div>
<jsp:include page="inc/footer.jsp"/>
</body>
</HTML>